package com.basic.test.controller;


import com.basic.common.result.WebResult;
import com.basic.test.domain.MemberInfoDemoBo;
import com.basic.test.modle.MemberInfoDemo;
import com.basic.test.sevice.MemberInfoDemoSevice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/test")
public class MemberInfoDemoController {

    @Autowired
    MemberInfoDemoSevice memberInfoDemoSevice;

    @RequestMapping(value = "/selMemberInfoById")
    public WebResult selMemberInfoById(MemberInfoDemoBo memberInfoDemoBo){
        MemberInfoDemo memberInfoDemo = memberInfoDemoSevice.selMemberInfoById(memberInfoDemoBo.getId());
        return WebResult.success(memberInfoDemo);
    }


    @RequestMapping(value = "/delMemberInfoById")
    public WebResult delMemberInfoById(MemberInfoDemoBo memberInfoDemoBo){
        return WebResult.success(memberInfoDemoSevice.delMemberInfoById(memberInfoDemoBo.getId()));
    }



}
